﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Details.aspx.vb" Inherits="Assignment_2___Prototype.Details" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .buttons
        {}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <br />
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataSourceID="SqlDataSource1" Height="116px" style="margin-left: 177px" 
        Width="512px">
        <Fields>
            <asp:BoundField DataField="Species" HeaderText="Species" 
                SortExpression="Species"></asp:BoundField>
            <asp:BoundField DataField="Breed" HeaderText="Breed" SortExpression="Breed" />
            <asp:BoundField DataField="ParrotSize" HeaderText="ParrotSize" 
                SortExpression="ParrotSize" />
                            <asp:BoundField DataField="LifeSpan" HeaderText="LifeSpan" 
                SortExpression="LifeSpan" />
            <asp:BoundField DataField="NoiseLevel" HeaderText="NoiseLevel" 
                SortExpression="NoiseLevel" />
            <asp:BoundField DataField="TalkingAbility" HeaderText="TalkingAbility" 
                SortExpression="TalkingAbility" />
            <asp:BoundField DataField="SuitableFor" HeaderText="SuitableFor" 
                SortExpression="SuitableFor" />
            <asp:BoundField DataField="Picture" HeaderText="Picture" 
                SortExpression="Picture" />
            <asp:CheckBoxField DataField="Playful" HeaderText="Playful" 
                SortExpression="Playful" />
            <asp:CheckBoxField DataField="Affectionate" HeaderText="Affectionate" 
                SortExpression="Affectionate" />
            <asp:ImageField DataImageUrlField="Picture">
                <ControlStyle BorderColor="Black" BorderStyle="Groove" 
                    CssClass="parrotImageBig" />
                <HeaderStyle CssClass="h2" />
            </asp:ImageField>
        </Fields>
    </asp:DetailsView>

    <br />
    
    <h3> <asp:LoginName ID="LoginName2" runat="server" style="margin-left: 335px"/>
    , You can Rate this Parrot.<br /> </h3>
    <br />
    
    <asp:Rating ID="ParrotRating" runat="server" BorderStyle="Solid" 
        BorderWidth="1" CurrentRating="2" EmptyStarCssClass="emptyRatingStar" 
        filledStarCssClass="filledRatingStar" Height="40" MaxRating="5" 
        StarCssClass="ratingStar" WaitingStarCssClass="savedRatingStar" 
        width="200" style="margin-left: 334px"
        >
    </asp:Rating>
    <br />
    <asp:Button ID="btn_Rate" runat="server" CssClass="buttons" 
        style="margin-left: 364px" Text="Submit Rating" Width="141px" />

    <br />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <br />

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="DataSource_Comments" Height="16px" Width="430px" 
        style="margin-left: 234px">
        <Columns>
            <asp:TemplateField HeaderText="Comments"> 
                  
            <ItemTemplate>
   
            <h2><%# Eval("Author")%></h2>  <br />
            <b><%# Eval("Subject")%></b>  >>>>  <%# Eval("Message")%><br />
            
            </ItemTemplate>
                 
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <br />
    <br />
    <asp:SqlDataSource ID="DataSource_Comments" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Author], [Subject], [Message] FROM [Comment] WHERE ([ParrotID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ParrotID" QueryStringField="ParrotID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [Species], [Breed], [ParrotSize], [LifeSpan], [NoiseLevel], [TalkingAbility], [SuitableFor], [Picture], [Playful], [Affectionate] FROM [Parrot] WHERE ([ParrotID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ParrotID" QueryStringField="ParrotID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <h3>
    <asp:LoginName ID="LoginName1" runat="server" />,
    You can Add your comment here.<br />  </h3>
    <br />
    Title<br />
    <asp:TextBox ID="tb_subject" runat="server" Width="330px"></asp:TextBox>
    <br />
    <br />
    Comment<br />
    <asp:TextBox ID="tb_message" runat="server" Height="100px" Width="330px" 
        TextMode="MultiLine"></asp:TextBox>
    <br />
    <br />
    <br />
    <asp:Button ID="btn_comment" runat="server" CssClass="buttons" Text="Post" 
        Width="136px" />
    <br />
    <br />
    <br />
    <br />
</asp:Content>
